libc++: add an option to build against compiler-rt This mirrors the option in libc++abi to build without libgcc. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@279606 91177308-0d34-0410-b5e6-96231b3b80d8 
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2934c6d..3d35be9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt 
@@ -68,6 +68,7 @@  option(LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY "Install libc++experimental.a" OFF)  set(LIBCXX_ABI_VERSION 1 CACHE STRING "ABI version of libc++.")  option(LIBCXX_ABI_UNSTABLE "Unstable ABI of libc++." OFF) +option(LIBCXX_USE_COMPILER_RT "Use compiler-rt instead of libgcc" OFF)    if (NOT LIBCXX_ENABLE_SHARED AND NOT LIBCXX_ENABLE_STATIC)  message(FATAL_ERROR "libc++ must be built as either a shared or static library.") @@ -277,6 +278,10 @@  # Configure compiler.  include(config-ix)   +if (LIBCXX_USE_COMPILER_RT) + list(APPEND LIBCXX_LINK_FLAGS "-rtlib=compiler-rt") +endif() +  # Configure coverage options.  if (LIBCXX_GENERATE_COVERAGE)  include(CodeCoverage)